import request from './../utils/request'

// 获取轮播图数据
export function getBannerData () {
  return request.get('/banner')
}

// 获取列表的数据 limit+count
export function getProData (params) {
  return request.get('/pro', { params })
}

// 获取商品详情的数据 proid
export function getProDetailData (params) {
  return request.get('/pro/detail', { params })
}

// 发送短信验证码
export function sendCode (params) {
  return request.post('/user/sendCode', params)
}

// 注册
export function register (params) {
  return request.post('/user/register', params)
}

// 登录
export function login (params) {
  return request.post('/user/login', params)
}

// 获取购物车信息
export function getCartData (params) {
  return request.get('/cart', params)
}

// 加入购物车
export function addCart (params) {
  return request.post('/cart/add', params)
}
